package com.zt.rongda.stock.model;

import com.zt.system.model.Entity;
import net.sf.json.JSONObject;

import java.io.Serializable;

public class StockType extends Entity implements Serializable {
    private String typeId;

    private String typeName;

    private String parentTypeId;

    private String unit;

    private Integer alertNum;

    private static final long serialVersionUID = 1L;

    public String getTypeId() {
        return typeId;
    }

    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getParentTypeId() {
        return parentTypeId;
    }

    public void setParentTypeId(String parentTypeId) {
        this.parentTypeId = parentTypeId;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public Integer getAlertNum() {
        return alertNum;
    }

    public void setAlertNum(Integer alertNum) {
        this.alertNum = alertNum;
    }

    public JSONObject toJSONObject() {
        JSONObject j = new JSONObject();
        j.put("typeId", typeId);
        j.put("typeName", typeName);
        j.put("parentTypeId", parentTypeId);
        j.put("unit", unit);
        j.put("alertNum", alertNum);
        return j;
    }
}